@page
@{ Layout = "_LayoutHome"; }
@section Styles{
    <style>
        .el-form-item {
            margin-bottom: 0px;
        }
        body {
            padding: 0;
            margin: 0;
            background-color: #ffffff;
        }

        html {
            padding: 0;
            margin: 0;
            background-color: #ffffff;
        }
    </style>
}
<el-card class="rounded-0">
    <div class="d-flex justify-content-between align-items-center">
        <div>
            <h2 class="h1 fw-bold">测评中心</h2>
        </div>
        <div>
            <el-form :inline="true" :model="form">
                <el-form-item label="测评">
                    <el-input prefix-icon="el-icon-search" v-model="form.keyWords" placeholder="关键字"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" plain icon="el-icon-search" v-on:click="btnSearchClick">查询</el-button>
                </el-form-item>
            </el-form>
        </div>
    </div>
</el-card>
<div class="p-3" v-if="total>0">
    <div>
        <div class="ms-5 position-relative card-hover-with-icon" v-for="(paper,index) in list" v-on:click="btnViewClick(paper)">
            <div class="position-absolute top-50 start-0 translate-middle">
                <div class="position-relative">
                    <i class="bi bi-person-exclamation fs-2 rounded-3 px-1 card-icon" :class="paper.submitType==='Submit'?'text-success':'text-warning'"></i>
                    <span class="position-absolute top-100 start-100 translate-middle mt-1 fs-6">{{ index+1 }}</span>
                </div>
            </div>
            <el-card shadow="hover" class="rounded-0 border-start-0 border-end-0">
                <div class="row align-items-center g-3 ms-6">
                    <div class="col">
                        <div class="mb-3">
                            <el-link :underline="false" v-on:click.stop="btnViewClick(paper)">
                                <span :class="paper.submitType==='Submit'?'text-success':''">{{ paper.title }}</span>
                            </el-link>
                        </div>
                        <ul class="list-inline fw-light">
                            <li class="list-inline-item fs-5">
                                <i class="el-icon-date me-2"></i>有效期：{{ paper.examStartDateTimeStr }}-{{ paper.examEndDateTimeStr }}
                            </li>
                            <li class="list-inline-item fs-5 fw-bold text-success" v-if="paper.configId>0">
                                <i class="bi bi-person-check me-2"></i>测评结果：{{ paper.configName }}
                            </li>
                        </ul>
                    </div>
                    <div class="col-auto">
                        <div class="bg-light p-2 rounded-pill">
                            <el-button type="success" plain icon="el-icon-s-order" class="rounded-pill" disabled v-if="paper.submitType==='Submit'">已提交</el-button>
                            <el-button type="warning" plain icon="el-icon-s-order" class="rounded-pill" v-on:click.stop="btnViewClick(paper)" v-else>开始测评</el-button>
                        </div>
                    </div>
                </div>
            </el-card>
        </div>
        <div class="my-5 text-center">
            <el-button icon="el-icon-refresh-right" v-if="list.length>0 && list.length<total" v-on:click="btnLoadMoreClick" :loading="loadMoreLoading">加载更多</el-button>
            <small v-else>没有更多了</small>
        </div>
    </div>
 
</div>
<div class="pt-10" v-else>
    <el-empty image="/sitefiles/assets/images/nodata.svg"></el-empty>
</div>
@section Scripts{
    <script src="/sitefiles/assets/js/home/exam/examAssessment.js" type="text/javascript"></script>
}